.halo-tree {
    font-size: 14px;
    transition: 0.3s height ease-in-out, 0.3s padding-top ease-in-out, 0.3s padding-bottom ease-in-out;

    li {
        margin: 0;
        padding: 5px 5px 5px 5px;
        position: relative;
        list-style: none;
        position: relative;

        span {
            &:hover {
                background-color: transparent;
            }
        }

        &:before {
            border-left: 1px dashed #d8d8d8;
            bottom: 50px;
            height: 100%;
            top: -10px;
            width: 1px;
        }

        &:after {
            border-top: 1px dashed #d8d8d8;
            height: 1px;
            top: 18px;
            // top: 50%;
            width: 28px;
        }

        &:last-child {
            &::before {
                height: 26px;
            }
        }

        &.leaf {
            padding-left: 10px;

            &:after {
                content: '';
                left: -7px;
                position: absolute;
                right: auto;
                border-top: 2px dashed #d8d8d8;
                width: 30px;
                // top: 17px;
                height: 100%;
            }
        }
    }

    .expand-enter-active {
        transition: all 3s ease;
        height: 50px;
        overflow: hidden;
    }

    .expand-leave-active {
        transition: all 3s ease;
        height: 0px;
        overflow: hidden;
    }

    ul {
        box-sizing: border-box;
        padding-left: 17px;
        padding-top: 10px;
    }

    .inputCheck {
        display: inline-block;
        position: relative;
        width: 16px;
        height: 16px;
        background: #fff;
        border: 1px solid #888888;
        border-radius: 2px;
        top: 3px;
        text-align: center;
        font-size: 14px;
        line-height: 14px;
        margin-right: 4px;

        &.notAllNodes {
            &:before {
                content: '\2713';
                display: block;
                position: absolute;
                width: 100%;
                height: 100%;
                background-color: #888888;
                z-index: 1;
                color: #ffffff;
            }
        }

        &.box-checked {
            border-color: @primary-color;
            background: @primary-color;
            &:after {
                content: "";
                display: table;
                width: 4px;
                height: 8px;
                position: absolute;
                top: 2px;
                left: 5px;
                border: 2px solid #fff;
                border-top: 0;
                border-left: 0;
                transform: rotate(45deg) scale(1);
                transition: all .2s ease-in-out;
                z-index: 2;
            }
        }
    }

    .box-halfchecked {
        border-color: @primary-color;

        &:after {
            content: '';
            display: block;
            position: absolute;
            z-index: 1;
            width: 9px;
            height: 9px;
            left: 2px;
            top: 2px;
            text-align: center;
            background: @primary-color;
        }
    }

    .check {
        display: block;
        position: absolute;
        font-size: 14px;
        width: 16px;
        height: 16px;
        left: -5px;
        top: -4px;
        border: 1px solid #000000;
        opacity: 0;
        cursor: pointer;
        -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';
        filter: alpha(opacity=0);
        z-index: 2;
    }

    .chkDisabled {
        background-color: #f5f5f5;
        opacity: 1;
        cursor: not-allowed;
    }

    &>li {
        &.first-node {
            &:before {
                top: 17px;
            }

            &.only-node {
                &::before {
                    border-left: none;
                }
            }
        }

        &.second-node {
            &:before {
                top: 4px;
            }
        }

        &.only-node {
            &:after {
                border-top: none;
            }
        }
    }

    &>ul {
        padding-left: 0;
    }

    .tree-expand {
        display: inline-block;
        width: 16px;
        height: 16px;
        text-align: center;
        line-height: 15px;
        border: 1px dotted #b2b2b2;
        border-radius: 2px;
        // background: #ffffff;
        font-style: normal;
        margin-right: 5px;

        .iconfont {
            line-height: 15px;
            font-size: 14px;
            color: #333;
            font-weight: bold;
        }
    }

    .tree-open {
        line-height: 13px;
        // &:after {
        //     content: "\2013";
        // }
    }

    // .tree-close {
    // &:after {
    //     content: "+";
    // }
    // }

    .tree-empty {
        position: relative;
        display: inline-block;
        width: 21px;
        // &:after {
        //   content: '';
        //   position: absolute;
        //   left: 0;
        //   right: 0;
        //   top: 9px;
        //   height: 1px;
        //   border-top: 1px dashed #d8d8d8;
        // }
    }

    .tree-node-el {
        // background-color: #ffffff;
        // padding-left: 2px;
        position: relative;
        z-index: 3;
        white-space: nowrap;
        line-height: 1.5;
    }

    .node-title {
        padding: 3px 3px;
        border-radius: 3px;
        cursor: pointer;
        margin: 0 2px;

        &:hover {
            background-color: #ccc;
        }

        &.node-searched {
            border: 1px solid #ff8247;
        }
    }

    .node-title-disabled {
        padding: 3px 3px;
        border-radius: 3px;
        background-color: #f5f5f5;
        opacity: 1;
        cursor: not-allowed;
        margin: 0 2px;

        &:hover {
            background-color: #f5f5f5;
        }
    }

    .node-selected {
        border: 1px solid #dddddd;
        background-color: #dddddd;
    }
}

.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.2s;
}

.fade-enter,
.fade-leave-to .__comment__-3 {
    // index: 3;
    opacity: 0;
}

.halo-tree .expand-enter,
.halo-tree .expand-leave {
    height: 0;
    opacity: 0;
}

.halo-tree ul,
.halo-tree li {
    list-style-type: none;
    text-align: left;
}

.halo-tree li:after,
.halo-tree li:before {
    content: '';
    left: -9px;
    position: absolute;
    right: auto;
    border-width: 1px;
}

/*Dynamic style part*/
.halo-tree-search-box {
    height: 18px;
    line-height: 18px;
    outline: none;
    border: 1px solid #888888;
    border-radius: 3px;

    &:focus {
        border: 1px solid rgb(56, 100, 131);
        box-shadow: 0 2px 2px rgba(16, 142, 233, 0.2);
        transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    }
}

.tree-folder-open,
.tree-folder-close {
    margin: 0;
    color: #1C87FF;
}